home *** CD-ROM | disk | FTP | other *** search
/ Level 2005 Christmas (DVD) / Level_2005-XMAS_134_DVD_Knightshift.iso / Demos / Ski Racing 2006 / setup1.cab / DataCommonShadersDX8AlphaResolve.psh < prev    next >
Encoding:
Text File  |  2005-11-03  |  483 b   |  18 lines

  1. ps.1.1
  2.  
  3. def c0, 1.0, 1.0, 1.0, 1.0
  4. def c1, 0.49, 0.49, 0.49, 0.49
  5. def c2, 0.0, 0.0, 0.0, 1.0
  6.  
  7. tex t0 ;Backgroundtexture
  8. tex t1 ;Scene without bd texture
  9.  
  10. ;mov r1, t1
  11. ;dp3 r1, c0, 1-r1
  12. dp3 r1, c0, t1        ;r1 is zero if color in scene texture is black
  13. add r0.a, r1, c1         ;add 0.49 so we can use the cnd function
  14. cnd r0, r0.a, c2, t0     ;if color in scene texture set black otherwise use background texture
  15. mov r0.a, c2.w         ;set alpha to 1, don't know if this is required
  16.  
  17.  
  18.